package Year22_Month03.day06;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            if (a % 2 == 0) {
                int left = a / 2;
                int right = a / 2;
                while (left >= 0) {
                    if (fun(left) && fun(right)) {
                        System.out.println(left);
                        System.out.println(right);
                        break;
                    } else {
                        left--;
                        right++;
                    }
                }
            } else {
                System.out.println("你输入的不是偶数");
            }
        }
    }
    //输入偶数
    public static boolean fun(int a){
        int number = (int) Math.sqrt(a);
        boolean isPrime = true;
        for(int i = 2;i <= number;i++){
            if (a % i == 0) {
                isPrime = false;//不是素数
                break;
            }
        }
        return isPrime == true;
    }
}
